Better document Michelson evm call - #443
Conversation
NicNomadic
left a comment
There was a problem hiding this comment.
I tested the added SmartPy examples in the online IDE, and the embedded tests were green. I have no idea if that's sufficient for saying the examples work with kernel Etherlink 7.
saroupille
left a comment
There was a problem hiding this comment.
Fact-checked every kernel-facing claim against the kernel sources on etherlink-ganesha — the page is accurate: enshrined gateway address (network-independent by construction), %call_evm entrypoint type and field order, gateway-computed Keccak256 selector, callback as a 0-mutez TRANSFER_TOKENS of the raw response bytes (None → dropped), whole-operation-group revert on EVM failure, and the staticcall_evm outcome table matches dispatch_staticcall_evm_get's mapping line for line (2xx → Some, other 4xx → None, 429 → out-of-gas failure, 5xx → failure). The FA1.2/ERC-20 wrapper removals are also correct (retired, no source in the kernel).
Two real bugs in the examples (inline, with suggestions) and two minor consistency nits. With the suggestions applied this is good to merge — @skenaja can apply them from the web UI since Nic is away.
🤖 Review researched with Claude Code on behalf of @saroupille
Apply saroupille's fact-check suggestions from PR #443: - callback field is `option (contract bytes)`, not `option bytes` - `VIEW` takes the view name and return type only (input comes from the stack) - staticcall_evm snippet: push the gateway address onto the stack and reorder pushes so `PAIR` builds `pair string bytes` - align on `sp.Some` (module syntax) over `sp.some` - glossary: selector goes in `calldata`, not `abi_params`
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Apply saroupille's fact-check suggestions from PR #443: - callback field is `option (contract bytes)`, not `option bytes` - `VIEW` takes the view name and return type only (input comes from the stack) - staticcall_evm snippet: push the gateway address onto the stack and reorder pushes so `PAIR` builds `pair string bytes` - align on `sp.Some` (module syntax) over `sp.some` - glossary: selector goes in `calldata`, not `abi_params`
d776432 to
a27e7a8
Compare
NB: Replaces #442 (closed)
Depends on #436
Solves issue #439
That is, fill in some important gaps in the doc of the Michelson interface. Except the aspects touching the ERC-20 and FA1.2 wrappers, because these were temporarily removed from the doc, while better doc for them is prepared.